.section-nav {
	padding-left: 0;
	border-left: 1px solid #eee;

	ul {
		padding-left: 1rem;

		ul {
			display: none;
		}
	}
}

.toc-entry {
	display: block;

	a {
		display: block;
		padding: 0.125rem 1.5rem;
		color: #99979c;

		&:hover {
			color: $blue;
			text-decoration: none;
		}
	}
}

.bd-sidebar {
	order: 0;
	background-color: #fafafa;
	height: 100%;
	@include media-breakpoint-between(xs, sm) {
		height: auto;
	}
	@include media-breakpoint-up(xl) {
		max-width: 320px;
	}
	// All levels of nav
	.nav > li > a {
		display: block;
		color: rgba(0, 0, 0, 0.65);
		font-weight: 500;
	}

	.nav > li > a:hover {
		color: rgba(0, 0, 0, 0.85);
		text-decoration: none;
		background-color: transparent;
	}

	.nav > .active > a,
	.nav > .active:hover > a {
		font-weight: 500;
		color: rgba(0, 0, 0, 0.85);
		background-color: transparent;
	}

	.nav > .active > a.active {
		border: 0 #343a40 solid;
		border-left-width: 4px;
		background-color: rgba(248, 248, 248, 0.62);
		border-radius: 0;
	}
}

.bd-links {
	padding-top: 1rem;
	padding-bottom: 1rem;
	margin-right: -15px;
	margin-left: -15px;
	@include media-breakpoint-up(md) {
		@supports (position: sticky) {
			max-height: calc(100vh - 9rem);
			overflow-y: auto;
		}
	}
	// Override collapse behaviors
	@include media-breakpoint-up(md) {
		display: block !important;
	}
}

.bd-search-docs-toggle {
	line-height: 1;
	color: $gray-900;
}

.bd-sidenav {
	display: none;
}

.bd-toc-link {
	display: block;
	padding: 0.25rem 1.5rem;
	font-weight: 500;
	color: rgba(0, 0, 0, 0.65);

	&:hover {
		color: rgba(0, 0, 0, 0.85);
		text-decoration: none;
	}
}

.bd-toc-item {
	&.active {
		margin-bottom: 1rem;

		&:not(:first-child) {
			margin-top: 1rem;
		}

		> .bd-toc-link {
			color: rgba(0, 0, 0, 0.85);

			&:hover {
				background-color: transparent;
			}
		}

		> .bd-sidenav {
			display: block;
		}
	}
}
